package com.example.schedule;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.time.LocalDateTime;

@EnableScheduling
@Configuration
public class ScheduleTest {
    private final static Logger log = LoggerFactory.getLogger(ScheduleApplication.class);

   // @Scheduled(cron = "0/5 * * * * *")
    public void schedule1() {
        log.info("schedule1 :{}", LocalDateTime.now());
    }

    //@Scheduled(fixedRate =3000)
    public void schedule2() {
        log.info("schedule2 :{}", LocalDateTime.now());
    }
}
